<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"    
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition template="../TemplateAdmin.xhtml">
        <ui:define name="title">
            <h:outputText value="Add Elevation Type"></h:outputText>
        </ui:define>       
        <ui:define name="body">
            <h:form>
                <p:panel>
                    <p:panelGrid columns="3" >
                        <f:facet name="header">
                            <b>Create Type Of Elevation</b>
                        </f:facet>

                        <h:outputLabel value="Name" for="etName" />
                        <p:inputText id="etName" value="#{elevationTypeController.selected.etName}" title="Name" 
                                     required="true" requiredMessage="The etName field is required"/>
                        <p:message id="etNameMessage" for="etName" display="text"/>  

                        <h:outputLabel value="Description" for="etDescription" /> 
                        <p:inputText id="etDescription" value="#{elevationTypeController.selected.etDescription}" title="Description" 
                                     required="true" requiredMessage="The Description field is required"/>
                        <p:message id="etDescriptionMessage" for="etDescription" display="text"/> 


                        <h:outputLabel value="Status" for="etStatus" />
                        <p:selectOneRadio id="etStatus" value="#{elevationTypeController.selected.etStatus}">  
                            <f:selectItem itemLabel="True" itemValue="1" />  
                            <f:selectItem itemLabel="False" itemValue="0" /> 
                        </p:selectOneRadio>
                        <h:panelGroup/>

                        <f:facet name="footer">
                            <br />
                        </f:facet>
                    </p:panelGrid>
                    <p:commandButton action="#{elevationTypeController.create}" value="Save" icon="ui-icon-check"/>
                    <p:commandButton action="#{elevationTypeController.prepareList}" value="Show All" immediate="true" icon="ui-icon-script"/>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>
</html>

